

static const long int crv_tab[256] = {
  0xFF33B580,0xFF354E15,0xFF36E6AA,0xFF387F3F, 
  0xFF3A17D4,0xFF3BB069,0xFF3D48FE,0xFF3EE193, 
  0xFF407A28,0xFF4212BD,0xFF43AB52,0xFF4543E7, 
  0xFF46DC7C,0xFF487511,0xFF4A0DA6,0xFF4BA63B, 
  0xFF4D3ED0,0xFF4ED765,0xFF506FFA,0xFF52088F, 
  0xFF53A124,0xFF5539B9,0xFF56D24E,0xFF586AE3, 
  0xFF5A0378,0xFF5B9C0D,0xFF5D34A2,0xFF5ECD37, 
  0xFF6065CC,0xFF61FE61,0xFF6396F6,0xFF652F8B, 
  0xFF66C820,0xFF6860B5,0xFF69F94A,0xFF6B91DF, 
  0xFF6D2A74,0xFF6EC309,0xFF705B9E,0xFF71F433, 
  0xFF738CC8,0xFF75255D,0xFF76BDF2,0xFF785687, 
  0xFF79EF1C,0xFF7B87B1,0xFF7D2046,0xFF7EB8DB, 
  0xFF805170,0xFF81EA05,0xFF83829A,0xFF851B2F, 
  0xFF86B3C4,0xFF884C59,0xFF89E4EE,0xFF8B7D83, 
  0xFF8D1618,0xFF8EAEAD,0xFF904742,0xFF91DFD7, 
  0xFF93786C,0xFF951101,0xFF96A996,0xFF98422B, 
  0xFF99DAC0,0xFF9B7355,0xFF9D0BEA,0xFF9EA47F, 
  0xFFA03D14,0xFFA1D5A9,0xFFA36E3E,0xFFA506D3, 
  0xFFA69F68,0xFFA837FD,0xFFA9D092,0xFFAB6927, 
  0xFFAD01BC,0xFFAE9A51,0xFFB032E6,0xFFB1CB7B, 
  0xFFB36410,0xFFB4FCA5,0xFFB6953A,0xFFB82DCF, 
  0xFFB9C664,0xFFBB5EF9,0xFFBCF78E,0xFFBE9023, 
  0xFFC028B8,0xFFC1C14D,0xFFC359E2,0xFFC4F277, 
  0xFFC68B0C,0xFFC823A1,0xFFC9BC36,0xFFCB54CB, 
  0xFFCCED60,0xFFCE85F5,0xFFD01E8A,0xFFD1B71F, 
  0xFFD34FB4,0xFFD4E849,0xFFD680DE,0xFFD81973, 
  0xFFD9B208,0xFFDB4A9D,0xFFDCE332,0xFFDE7BC7, 
  0xFFE0145C,0xFFE1ACF1,0xFFE34586,0xFFE4DE1B, 
  0xFFE676B0,0xFFE80F45,0xFFE9A7DA,0xFFEB406F, 
  0xFFECD904,0xFFEE7199,0xFFF00A2E,0xFFF1A2C3, 
  0xFFF33B58,0xFFF4D3ED,0xFFF66C82,0xFFF80517, 
  0xFFF99DAC,0xFFFB3641,0xFFFCCED6,0xFFFE676B, 
  0x00000000,0x00019895,0x0003312A,0x0004C9BF, 
  0x00066254,0x0007FAE9,0x0009937E,0x000B2C13, 
  0x000CC4A8,0x000E5D3D,0x000FF5D2,0x00118E67, 
  0x001326FC,0x0014BF91,0x00165826,0x0017F0BB, 
  0x00198950,0x001B21E5,0x001CBA7A,0x001E530F, 
  0x001FEBA4,0x00218439,0x00231CCE,0x0024B563, 
  0x00264DF8,0x0027E68D,0x00297F22,0x002B17B7, 
  0x002CB04C,0x002E48E1,0x002FE176,0x00317A0B, 
  0x003312A0,0x0034AB35,0x003643CA,0x0037DC5F, 
  0x003974F4,0x003B0D89,0x003CA61E,0x003E3EB3, 
  0x003FD748,0x00416FDD,0x00430872,0x0044A107, 
  0x0046399C,0x0047D231,0x00496AC6,0x004B035B, 
  0x004C9BF0,0x004E3485,0x004FCD1A,0x005165AF, 
  0x0052FE44,0x005496D9,0x00562F6E,0x0057C803, 
  0x00596098,0x005AF92D,0x005C91C2,0x005E2A57, 
  0x005FC2EC,0x00615B81,0x0062F416,0x00648CAB, 
  0x00662540,0x0067BDD5,0x0069566A,0x006AEEFF, 
  0x006C8794,0x006E2029,0x006FB8BE,0x00715153, 
  0x0072E9E8,0x0074827D,0x00761B12,0x0077B3A7, 
  0x00794C3C,0x007AE4D1,0x007C7D66,0x007E15FB, 
  0x007FAE90,0x00814725,0x0082DFBA,0x0084784F, 
  0x008610E4,0x0087A979,0x0089420E,0x008ADAA3, 
  0x008C7338,0x008E0BCD,0x008FA462,0x00913CF7, 
  0x0092D58C,0x00946E21,0x009606B6,0x00979F4B, 
  0x009937E0,0x009AD075,0x009C690A,0x009E019F, 
  0x009F9A34,0x00A132C9,0x00A2CB5E,0x00A463F3, 
  0x00A5FC88,0x00A7951D,0x00A92DB2,0x00AAC647, 
  0x00AC5EDC,0x00ADF771,0x00AF9006,0x00B1289B, 
  0x00B2C130,0x00B459C5,0x00B5F25A,0x00B78AEF, 
  0x00B92384,0x00BABC19,0x00BC54AE,0x00BDED43, 
  0x00BF85D8,0x00C11E6D,0x00C2B702,0x00C44F97, 
  0x00C5E82C,0x00C780C1,0x00C91956,0x00CAB1EB, 
};
static const long int cbu_tab[256] = {
0x00BF85D8,0x00C11E6D,0x00C2B702,0x00C44F97,  
0x00C5E82C,0x00C780C1,0x00C91956,0x00CAB1EB, 
0xFEFDCB80,0xFEFFCFE9,0xFF01D452,0xFF03D8BB,  
0xFF05DD24,0xFF07E18D,0xFF09E5F6,0xFF0BEA5F, 
0xFF0DEEC8,0xFF0FF331,0xFF11F79A,0xFF13FC03,
0xFF16006C,0xFF1804D5,0xFF1A093E,0xFF1C0DA7,  
0xFF1E1210,0xFF201679,0xFF221AE2,0xFF241F4B, 
0xFF2623B4,0xFF28281D,0xFF2A2C86,0xFF2C30EF,  
0xFF2E3558,0xFF3039C1,0xFF323E2A,0xFF344293,  
0xFF3646FC,0xFF384B65,0xFF3A4FCE,0xFF3C5437,  
0xFF3E58A0,0xFF405D09,0xFF426172,0xFF4465DB,  
0xFF466A44,0xFF486EAD,0xFF4A7316,0xFF4C777F,  
0xFF4E7BE8,0xFF508051,0xFF5284BA,0xFF548923,  
0xFF568D8C,0xFF5891F5,0xFF5A965E,0xFF5C9AC7,  
0xFF5E9F30,0xFF60A399,0xFF62A802,0xFF64AC6B,  
0xFF66B0D4,0xFF68B53D,0xFF6AB9A6,0xFF6CBE0F,  
0xFF6EC278,0xFF70C6E1,0xFF72CB4A,0xFF74CFB3,  
0xFF76D41C,0xFF78D885,0xFF7ADCEE,0xFF7CE157,  
0xFF7EE5C0,0xFF80EA29,0xFF82EE92,0xFF84F2FB,  
0xFF86F764,0xFF88FBCD,0xFF8B0036,0xFF8D049F,  
0xFF8F0908,0xFF910D71,0xFF9311DA,0xFF951643,  
0xFF971AAC,0xFF991F15,0xFF9B237E,0xFF9D27E7,  
0xFF9F2C50,0xFFA130B9,0xFFA33522,0xFFA5398B,  
0xFFA73DF4,0xFFA9425D,0xFFAB46C6,0xFFAD4B2F,  
0xFFAF4F98,0xFFB15401,0xFFB3586A,0xFFB55CD3,  
0xFFB7613C,0xFFB965A5,0xFFBB6A0E,0xFFBD6E77, 
0xFFBF72E0,0xFFC17749,0xFFC37BB2,0xFFC5801B,  
0xFFC78484,0xFFC988ED,0xFFCB8D56,0xFFCD91BF,  
0xFFCF9628,0xFFD19A91,0xFFD39EFA,0xFFD5A363,  
0xFFD7A7CC,0xFFD9AC35,0xFFDBB09E,0xFFDDB507,  
0xFFDFB970,0xFFE1BDD9,0xFFE3C242,0xFFE5C6AB,  
0xFFE7CB14,0xFFE9CF7D,0xFFEBD3E6,0xFFEDD84F,  
0xFFEFDCB8,0xFFF1E121,0xFFF3E58A,0xFFF5E9F3,  
0xFFF7EE5C,0xFFF9F2C5,0xFFFBF72E,0xFFFDFB97,  
0x00000000,0x00020469,0x000408D2,0x00060D3B,  
0x000811A4,0x000A160D,0x000C1A76,0x000E1EDF,  
0x00102348,0x001227B1,0x00142C1A,0x00163083,  
0x001834EC,0x001A3955,0x001C3DBE,0x001E4227,  
0x00204690,0x00224AF9,0x00244F62,0x002653CB,  
0x00285834,0x002A5C9D,0x002C6106,0x002E656F,  
0x003069D8,0x00326E41,0x003472AA,0x00367713,  
0x00387B7C,0x003A7FE5,0x003C844E,0x003E88B7,  
0x00408D20,0x00429189,0x004495F2,0x00469A5B,  
0x00489EC4,0x004AA32D,0x004CA796,0x004EABFF,  
0x0050B068,0x0052B4D1,0x0054B93A,0x0056BDA3,  
0x0058C20C,0x005AC675,0x005CCADE,0x005ECF47,  
0x0060D3B0,0x0062D819,0x0064DC82,0x0066E0EB,  
0x0068E554,0x006AE9BD,0x006CEE26,0x006EF28F,  
0x0070F6F8,0x0072FB61,0x0074FFCA,0x00770433,  
0x0079089C,0x007B0D05,0x007D116E,0x007F15D7,  
0x00811A40,0x00831EA9,0x00852312,0x0087277B,  
0x00892BE4,0x008B304D,0x008D34B6,0x008F391F,  
0x00913D88,0x009341F1,0x0095465A,0x00974AC3,  
0x00994F2C,0x009B5395,0x009D57FE,0x009F5C67, 
0x00A160D0,0x00A36539,0x00A569A2,0x00A76E0B,  
0x00A97274,0x00AB76DD,0x00AD7B46,0x00AF7FAF,  
0x00B18418,0x00B38881,0x00B58CEA,0x00B79153,  
0x00B995BC,0x00BB9A25,0x00BD9E8E,0x00BFA2F7,  
0x00C1A760,0x00C3ABC9,0x00C5B032,0x00C7B49B,  
0x00C9B904,0x00CBBD6D,0x00CDC1D6,0x00CFC63F,  
0x00D1CAA8,0x00D3CF11,0x00D5D37A,0x00D7D7E3,  
0x00D9DC4C,0x00DBE0B5,0x00DDE51E,0x00DFE987,  
0x00E1EDF0,0x00E3F259,0x00E5F6C2,0x00E7FB2B,  
0x00E9FF94,0x00EC03FD,0x00EE0866,0x00F00CCF,
};
static const long int cgu_tab[256] = {
0xFFCDDA80,0xFFCE3ECB,0xFFCEA316,0xFFCF0761,  
0xFFCF6BAC,0xFFCFCFF7,0xFFD03442,0xFFD0988D,  
0xFFD0FCD8,0xFFD16123,0xFFD1C56E,0xFFD229B9,  
0xFFD28E04,0xFFD2F24F,0xFFD3569A,0xFFD3BAE5,  
0xFFD41F30,0xFFD4837B,0xFFD4E7C6,0xFFD54C11,  
0xFFD5B05C,0xFFD614A7,0xFFD678F2,0xFFD6DD3D,  
0xFFD74188,0xFFD7A5D3,0xFFD80A1E,0xFFD86E69,  
0xFFD8D2B4,0xFFD936FF,0xFFD99B4A,0xFFD9FF95,  
0xFFDA63E0,0xFFDAC82B,0xFFDB2C76,0xFFDB90C1,  
0xFFDBF50C,0xFFDC5957,0xFFDCBDA2,0xFFDD21ED,  
0xFFDD8638,0xFFDDEA83,0xFFDE4ECE,0xFFDEB319,  
0xFFDF1764,0xFFDF7BAF,0xFFDFDFFA,0xFFE04445,  
0xFFE0A890,0xFFE10CDB,0xFFE17126,0xFFE1D571,  
0xFFE239BC,0xFFE29E07,0xFFE30252,0xFFE3669D,  
0xFFE3CAE8,0xFFE42F33,0xFFE4937E,0xFFE4F7C9,  
0xFFE55C14,0xFFE5C05F,0xFFE624AA,0xFFE688F5,  
0xFFE6ED40,0xFFE7518B,0xFFE7B5D6,0xFFE81A21,  
0xFFE87E6C,0xFFE8E2B7,0xFFE94702,0xFFE9AB4D,  
0xFFEA0F98,0xFFEA73E3,0xFFEAD82E,0xFFEB3C79,  
0xFFEBA0C4,0xFFEC050F,0xFFEC695A,0xFFECCDA5,  
0xFFED31F0,0xFFED963B,0xFFEDFA86,0xFFEE5ED1,  
0xFFEEC31C,0xFFEF2767,0xFFEF8BB2,0xFFEFEFFD,  
0xFFF05448,0xFFF0B893,0xFFF11CDE,0xFFF18129,  
0xFFF1E574,0xFFF249BF,0xFFF2AE0A,0xFFF31255,  
0xFFF376A0,0xFFF3DAEB,0xFFF43F36,0xFFF4A381,  
0xFFF507CC,0xFFF56C17,0xFFF5D062,0xFFF634AD,  
0xFFF698F8,0xFFF6FD43,0xFFF7618E,0xFFF7C5D9,  
0xFFF82A24,0xFFF88E6F,0xFFF8F2BA,0xFFF95705,  
0xFFF9BB50,0xFFFA1F9B,0xFFFA83E6,0xFFFAE831,  
0xFFFB4C7C,0xFFFBB0C7,0xFFFC1512,0xFFFC795D,  
0xFFFCDDA8,0xFFFD41F3,0xFFFDA63E,0xFFFE0A89,  
0xFFFE6ED4,0xFFFED31F,0xFFFF376A,0xFFFF9BB5,  
0x00000000,0x0000644B,0x0000C896,0x00012CE1,  
0x0001912C,0x0001F577,0x000259C2,0x0002BE0D,  
0x00032258,0x000386A3,0x0003EAEE,0x00044F39,	
};
static const long int cgv_tab[256] = {
0xFF97F080,0xFF98C09F,0xFF9990BE,0xFF9A60DD, 
0xFF9B30FC,0xFF9C011B,0xFF9CD13A,0xFF9DA159, 
0xFF9E7178,0xFF9F4197,0xFFA011B6,0xFFA0E1D5, 
0xFFA1B1F4,0xFFA28213,0xFFA35232,0xFFA42251, 
0xFFA4F270,0xFFA5C28F,0xFFA692AE,0xFFA762CD, 
0xFFA832EC,0xFFA9030B,0xFFA9D32A,0xFFAAA349, 
0xFFAB7368,0xFFAC4387,0xFFAD13A6,0xFFADE3C5, 
0xFFAEB3E4,0xFFAF8403,0xFFB05422,0xFFB12441, 
0xFFB1F460,0xFFB2C47F,0xFFB3949E,0xFFB464BD, 
0xFFB534DC,0xFFB604FB,0xFFB6D51A,0xFFB7A539, 
0xFFB87558,0xFFB94577,0xFFBA1596,0xFFBAE5B5, 
0xFFBBB5D4,0xFFBC85F3,0xFFBD5612,0xFFBE2631, 
0xFFBEF650,0xFFBFC66F,0xFFC0968E,0xFFC166AD, 
0xFFC236CC,0xFFC306EB,0xFFC3D70A,0xFFC4A729, 
0xFFC57748,0xFFC64767,0xFFC71786,0xFFC7E7A5, 
0xFFC8B7C4,0xFFC987E3,0xFFCA5802,0xFFCB2821, 
0xFFCBF840,0xFFCCC85F,0xFFCD987E,0xFFCE689D, 
0xFFCF38BC,0xFFD008DB,0xFFD0D8FA,0xFFD1A919, 
0xFFD27938,0xFFD34957,0xFFD41976,0xFFD4E995, 
0xFFD5B9B4,0xFFD689D3,0xFFD759F2,0xFFD82A11, 
0xFFD8FA30,0xFFD9CA4F,0xFFDA9A6E,0xFFDB6A8D, 
0xFFDC3AAC,0xFFDD0ACB,0xFFDDDAEA,0xFFDEAB09, 
0xFFDF7B28,0xFFE04B47,0xFFE11B66,0xFFE1EB85, 
0xFFE2BBA4,0xFFE38BC3,0xFFE45BE2,0xFFE52C01, 
0xFFE5FC20,0xFFE6CC3F,0xFFE79C5E,0xFFE86C7D, 
0xFFE93C9C,0xFFEA0CBB,0xFFEADCDA,0xFFEBACF9, 
0xFFEC7D18,0xFFED4D37,0xFFEE1D56,0xFFEEED75, 
0xFFEFBD94,0xFFF08DB3,0xFFF15DD2,0xFFF22DF1, 
0xFFF2FE10,0xFFF3CE2F,0xFFF49E4E,0xFFF56E6D, 
0xFFF63E8C,0xFFF70EAB,0xFFF7DECA,0xFFF8AEE9, 
0xFFF97F08,0xFFFA4F27,0xFFFB1F46,0xFFFBEF65, 
0xFFFCBF84,0xFFFD8FA3,0xFFFE5FC2,0xFFFF2FE1, 
0x00000000,0x0000D01F,0x0001A03E,0x0002705D, 
0x0003407C,0x0004109B,0x0004E0BA,0x0005B0D9, 
0x000680F8,0x00075117,0x00082136,0x0008F155, 
0x0009C174,0x000A9193,0x000B61B2,0x000C31D1, 
0x000D01F0,0x000DD20F,0x000EA22E,0x000F724D, 
0x0010426C,0x0011128B,0x0011E2AA,0x0012B2C9, 
0x001382E8,0x00145307,0x00152326,0x0015F345, 
0x0016C364,0x00179383,0x001863A2,0x001933C1, 
0x001A03E0,0x001AD3FF,0x001BA41E,0x001C743D, 
0x001D445C,0x001E147B,0x001EE49A,0x001FB4B9, 
0x002084D8,0x002154F7,0x00222516,0x0022F535, 
0x0023C554,0x00249573,0x00256592,0x002635B1, 
0x002705D0,0x0027D5EF,0x0028A60E,0x0029762D, 
0x002A464C,0x002B166B,0x002BE68A,0x002CB6A9, 
0x002D86C8,0x002E56E7,0x002F2706,0x002FF725, 
0x0030C744,0x00319763,0x00326782,0x003337A1, 
0x003407C0,0x0034D7DF,0x0035A7FE,0x0036781D, 
0x0037483C,0x0038185B,0x0038E87A,0x0039B899, 
0x003A88B8,0x003B58D7,0x003C28F6,0x003CF915, 
0x003DC934,0x003E9953,0x003F6972,0x00403991, 
0x004109B0,0x0041D9CF,0x0042A9EE,0x00437A0D, 
0x00444A2C,0x00451A4B,0x0045EA6A,0x0046BA89, 
0x00478AA8,0x00485AC7,0x00492AE6,0x0049FB05, 
0x004ACB24,0x004B9B43,0x004C6B62,0x004D3B81, 
0x004E0BA0,0x004EDBBF,0x004FABDE,0x00507BFD, 
0x00514C1C,0x00521C3B,0x0052EC5A,0x0053BC79, 
0x00548C98,0x00555CB7,0x00562CD6,0x0056FCF5, 
0x0057CD14,0x00589D33,0x00596D52,0x005A3D71, 
0x005B0D90,0x005BDDAF,0x005CADCE,0x005D7DED, 
0x005E4E0C,0x005F1E2B,0x005FEE4A,0x0060BE69, 
0x00618E88,0x00625EA7,0x00632EC6,0x0063FEE5, 
0x0064CF04,0x00659F23,0x00666F42,0x00673F61,	
};
static const long int tab_76309[256] = {
0xFFED5EB0,0xFFEE88C5,0xFFEFB2DA,0xFFF0DCEF,  
0xFFF20704,0xFFF33119,0xFFF45B2E,0xFFF58543,  
0xFFF6AF58,0xFFF7D96D,0xFFF90382,0xFFFA2D97,  
0xFFFB57AC,0xFFFC81C1,0xFFFDABD6,0xFFFED5EB,  
0x00000000,0x00012A15,0x0002542A,0x00037E3F,  
0x0004A854,0x0005D269,0x0006FC7E,0x00082693,  
0x000950A8,0x000A7ABD,0x000BA4D2,0x000CCEE7,  
0x000DF8FC,0x000F2311,0x00104D26,0x0011773B,  
0x0012A150,0x0013CB65,0x0014F57A,0x00161F8F,  
0x001749A4,0x001873B9,0x00199DCE,0x001AC7E3,  
0x001BF1F8,0x001D1C0D,0x001E4622,0x001F7037,  
0x00209A4C,0x0021C461,0x0022EE76,0x0024188B,  
0x002542A0,0x00266CB5,0x002796CA,0x0028C0DF,  
0x0029EAF4,0x002B1509,0x002C3F1E,0x002D6933,  
0x002E9348,0x002FBD5D,0x0030E772,0x00321187,  
0x00333B9C,0x003465B1,0x00358FC6,0x0036B9DB,  
0x0037E3F0,0x00390E05,0x003A381A,0x003B622F,  
0x003C8C44,0x003DB659,0x003EE06E,0x00400A83,  
0x00413498,0x00425EAD,0x004388C2,0x0044B2D7,  
0x0045DCEC,0x00470701,0x00483116,0x00495B2B,  
0x004A8540,0x004BAF55,0x004CD96A,0x004E037F,  
0x004F2D94,0x005057A9,0x005181BE,0x0052ABD3,  
0x0053D5E8,0x0054FFFD,0x00562A12,0x00575427,  
0x00587E3C,0x0059A851,0x005AD266,0x005BFC7B,  
0x005D2690,0x005E50A5,0x005F7ABA,0x0060A4CF,  
0x0061CEE4,0x0062F8F9,0x0064230E,0x00654D23,  
0x00667738,0x0067A14D,0x0068CB62,0x0069F577,  
0x006B1F8C,0x006C49A1,0x006D73B6,0x006E9DCB,  
0x006FC7E0,0x0070F1F5,0x00721C0A,0x0073461F,  
0x00747034,0x00759A49,0x0076C45E,0x0077EE73,  
0x00791888,0x007A429D,0x007B6CB2,0x007C96C7,  
0x007DC0DC,0x007EEAF1,0x00801506,0x00813F1B,  
0x00826930,0x00839345,0x0084BD5A,0x0085E76F,  
0x00871184,0x00883B99,0x008965AE,0x008A8FC3,  
0x008BB9D8,0x008CE3ED,0x008E0E02,0x008F3817,  
0x0090622C,0x00918C41,0x0092B656,0x0093E06B,  
0x00950A80,0x00963495,0x00975EAA,0x009888BF,  
0x0099B2D4,0x009ADCE9,0x009C06FE,0x009D3113,  
0x009E5B28,0x009F853D,0x00A0AF52,0x00A1D967,  
0x00A3037C,0x00A42D91,0x00A557A6,0x00A681BB,  
0x00A7ABD0,0x00A8D5E5,0x00A9FFFA,0x00AB2A0F,  
0x00AC5424,0x00AD7E39,0x00AEA84E,0x00AFD263,  
0x00B0FC78,0x00B2268D,0x00B350A2,0x00B47AB7,  
0x00B5A4CC,0x00B6CEE1,0x00B7F8F6,0x00B9230B,  
0x00BA4D20,0x00BB7735,0x00BCA14A,0x00BDCB5F,  
0x00BEF574,0x00C01F89,0x00C1499E,0x00C273B3,  
0x00C39DC8,0x00C4C7DD,0x00C5F1F2,0x00C71C07,  
0x00C8461C,0x00C97031,0x00CA9A46,0x00CBC45B,  
0x00CCEE70,0x00CE1885,0x00CF429A,0x00D06CAF,  
0x00D196C4,0x00D2C0D9,0x00D3EAEE,0x00D51503,  
0x00D63F18,0x00D7692D,0x00D89342,0x00D9BD57,  
0x00DAE76C,0x00DC1181,0x00DD3B96,0x00DE65AB,  
0x00DF8FC0,0x00E0B9D5,0x00E1E3EA,0x00E30DFF,  
0x00E43814,0x00E56229,0x00E68C3E,0x00E7B653,  
0x00E8E068,0x00EA0A7D,0x00EB3492,0x00EC5EA7,  
0x00ED88BC,0x00EEB2D1,0x00EFDCE6,0x00F106FB,  
0x00F23110,0x00F35B25,0x00F4853A,0x00F5AF4F,  
0x00F6D964,0x00F80379,0x00F92D8E,0x00FA57A3,  
0x00FB81B8,0x00FCABCD,0x00FDD5E2,0x00FEFFF7,  
0x01002A0C,0x01015421,0x01027E36,0x0103A84B,  
0x0104D260,0x0105FC75,0x0107268A,0x0108509F,  
0x01097AB4,0x010AA4C9,0x010BCEDE,0x010CF8F3,  
0x010E2308,0x010F4D1D,0x01107732,0x0111A147,  
0x0112CB5C,0x0113F571,0x01151F86,0x0116499B,
};
static const unsigned char clp[1024] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,
0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,
0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,
0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,
0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,
0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,
0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,
0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,
0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,
0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,
0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,
0x9C,0x9D,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,
0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,
0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,
0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,
0xCE,0xCF,0xD0,0xD1,0xD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FF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF, 
};

//420 to  rgb
void ime_YUV420ToBGR888(unsigned char* srcy,unsigned char* srcu,unsigned char* srcv,
    unsigned char* dst_bgr,int width,int height)
{
 unsigned char *src0;
 unsigned char *src1;
 unsigned char *src2;
 int y1,y2,u,v; 
 unsigned char *py1,*py2;
 int i,j, c1, c2, c3, c4;
 unsigned char *d1, *d2;
 
 //Initialization
 src0=srcy;
 src1=srcu;
 src2=srcv;
 
 py1=src0;
 py2=py1+width;
 d1=dst_bgr;
 d2=d1+3*width;
  for (j = 0; j < height; j += 2) { 
  for (i = 0; i < width; i += 2) {
 
   u = *src1++;
   v = *src2++;
 
   c1 = crv_tab[v];
   c2 = cgu_tab[u];
   c3 = cgv_tab[v];
   c4 = cbu_tab[u];
 
   //up-left
            y1 = tab_76309[*py1++]; 
            *d1++ = clp[384+((y1 + c4)>>16)];
   *d1++ = clp[384+((y1 - c2 - c3)>>16)];
   *d1++ = clp[384+((y1 + c1)>>16)];  
 
   //down-left
   y2 = tab_76309[*py2++];
            *d2++ = clp[384+((y2 + c4)>>16)];
   *d2++ = clp[384+((y2 - c2 - c3)>>16)];
   *d2++ = clp[384+((y2 + c1)>>16)];  
 
   //up-right
   y1 = tab_76309[*py1++];
   *d1++ = clp[384+((y1 + c4)>>16)];
   *d1++ = clp[384+((y1 - c2 - c3)>>16)];
   *d1++ = clp[384+((y1 + c1)>>16)];  
 
   //down-right
   y2 = tab_76309[*py2++];
            *d2++ = clp[384+((y2 + c4)>>16)];
   *d2++ = clp[384+((y2 - c2 - c3)>>16)];
   *d2++ = clp[384+((y2 + c1)>>16)];  
  }
  d1 += 3*width;
  d2 += 3*width;
  py1+=   width;
  py2+=   width;
 }       
}
 

void ime_YUV420ToBGR565(char *yBuf, char *uBuf, char *vBuf, char *rgbBuf, int width, int height)
{
 unsigned char *src0;
 unsigned char *src1;
 unsigned char *src2;
 int y1,y2,u,v; 
 unsigned char *py1,*py2;
 int i,j, c1, c2, c3, c4;
 unsigned char *d1, *d2;
 
 unsigned char r,g,b;
 int imgSize = width * height;
 int doubWidth = width<<1;
 
 src0=(unsigned char *)yBuf;
 src1=(unsigned char *)uBuf;
 src2=(unsigned char *)vBuf;
 
 py1=src0;
 py2=py1+width;
 d1=(unsigned char *)rgbBuf;
 d2=d1+doubWidth;
 for (j = 0; j < height; j += 2) { 
  for (i = 0; i < width; i += 2) {
   
   u = *src1++;
   v = *src2++;
   
   c1 = crv_tab[v];
   c2 = cgu_tab[u];
   c3 = cgv_tab[v];
   c4 = cbu_tab[u];
   
   //up-left
   y1 = tab_76309[*py1++]; 
   b = clp[384+((y1 + c4)>>16)];
   g = clp[384+((y1 - c2 - c3)>>16)];
   r = clp[384+((y1 + c1)>>16)];  
   *(unsigned short*)d1 = ((r>>3)<<11) | ((g>>2)<< 5) | (b>>3);
   d1 += 2;
   
   //down-left
   y2 = tab_76309[*py2++];
   b = clp[384+((y2 + c4)>>16)];
   g = clp[384+((y2 - c2 - c3)>>16)];
   r = clp[384+((y2 + c1)>>16)];  
   *(unsigned short*)d2 = ((r>>3)<<11) | ((g>>2)<< 5) | (b>>3);
   d2 += 2;
   
   
   //up-right
   y1 = tab_76309[*py1++];
   b = clp[384+((y1 + c4)>>16)];
   g = clp[384+((y1 - c2 - c3)>>16)];
   r = clp[384+((y1 + c1)>>16)];  
   *(unsigned short*)d1 = ((r>>3)<<11) | ((g>>2)<< 5) | (b>>3);
   d1 += 2;
 
  
   //down-right
   y2 = tab_76309[*py2++];
   b = clp[384+((y2 + c4)>>16)];
   g = clp[384+((y2 - c2 - c3)>>16)];
   r = clp[384+((y2 + c1)>>16)];  
   *(unsigned short*)d2 = ((r>>3)<<11) | ((g>>2)<< 5) | (b>>3);
   d2 += 2;
   
  }
  d1 += doubWidth;
  d2 += doubWidth;
  py1 += width;
  py2 += width;
 }       
}
 